﻿#ifndef NEWFINANCEWIDGET_H
#define NEWFINANCEWIDGET_H

#include <QDialog>
#include "financeitem.h"
#include "financeservice.h"
#include "userservice.h"

namespace Ui {
class NewFinanceWidget;
}

class NewFinanceWidget : public QDialog
{
    Q_OBJECT

public:
    explicit NewFinanceWidget(QWidget *parent = nullptr);
    ~NewFinanceWidget();

    void showWithFinanceItem(FinanceItem *financeItem);
private slots:
    void on_pushButtonCancel_clicked();

    void on_pushButtonOK_clicked();

    void on_lineEditMoney_editingFinished();

private:
    Ui::NewFinanceWidget *ui;

    FinanceItem *financeItem;
    FinanceService financeService;
    UserService userService;
};

#endif // NEWFINANCEWIDGET_H
